package com.zm.tools.generatebackcode.core;

/**
 * @author zoum
 * @create 2018/11/3 14:52
 */
public class PackageNameUtil {

    public static String getPackage(String companyName, String appName, String modelName){
        String []ary = appName.split("-");
        if(ary.length>1){
            return "com." + companyName + ".back." + ary[1] + "." + modelName;
        }else {
            return "com." + companyName + ".back." + ary[0] + "." + modelName;
        }
    }

    public static String getPomPackage(String companyName, String appName){
        String []ary = appName.split("-");
        if(ary.length>1){
            return "com." + companyName + ".back." + ary[1];
        }else {
            return "com." + companyName + ".back." + ary[0];
        }
    }
}
